<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<form action="<?php echo url_for('operator/'.($form->getObject()->isNew() ? 'createTour' : 'updateTour').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table border=1>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php echo $form->renderHiddenFields() ?>
          &nbsp;<a href="<?php echo url_for('operator/index') ?>">Cancel</a>
          <?php if (!$form->getObject()->isNew()): ?>
            &nbsp;<?php echo link_to('Delete', 'operator/deleteTour?id='.$form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
          <?php endif; ?>
          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        
        <td>
          <?php echo $form['user_id']->renderError() ?>
          <?php echo $form['user_id'] ?>
        </td>
      </tr>
       <tr>
        <th><?php echo $form['tour_title']->renderLabel() ?></th>
        <td>
          <?php echo $form['tour_title']->renderError() ?>
          <?php echo $form['tour_title'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['tour_description']->renderLabel() ?></th>
        <td>
          <?php echo $form['tour_description']->renderError() ?>
          <?php echo $form['tour_description'] ?>
        </td>
      </tr>
      
      <tr>
        <th><?php echo $form['price']->renderLabel() ?></th>
        <td>
          <?php echo $form['price']->renderError() ?>
          <?php echo $form['price'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['country']->renderLabel() ?></th>
        <td>
          <?php echo $form['country']->renderError() ?>
          <?php echo $form['country'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['city']->renderLabel() ?></th>
        <td>
          <?php echo $form['city']->renderError() ?>
          <?php echo $form['city'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['state']->renderLabel() ?></th>
        <td>
          <?php echo $form['state']->renderError() ?>
          <?php echo $form['state'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['zip']->renderLabel() ?></th>
        <td>
          <?php echo $form['zip']->renderError() ?>
          <?php echo $form['zip'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['keywords']->renderLabel() ?></th>
        <td>
          <?php echo $form['keywords']->renderError() ?>
          <?php echo $form['keywords'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['tour_image']->renderLabel() ?></th>
        <td>
          <?php echo lw_link('Add Images', 'operator/newImage?id='.$form->getObject()->getId(),'width=600') ?>
         
        </td>
      </tr>
    </tbody>
  </table>
</form>
